package com.nervenets.template.controller.role.params;

import com.nervenets.general.enumeration.ClientType;
import com.nervenets.general.web.params.FormParams;
import com.nervenets.template.hibernate.domain.user.RoleGroup;
import com.nervenets.template.service.RoleGroupService;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class RoleGroupFormParams extends FormParams<RoleGroup, RoleGroupService> {
    @ApiModelProperty(value = "客户端类型", required = true)
    @NotNull
    private ClientType clientType;
    @ApiModelProperty(value = "权限组名称", required = true)
    @NotNull(message = "权限组名称不能为空")
    private String name;
    @ApiModelProperty(value = "权限组描述", required = true)
    @NotNull(message = "权限组描述不能为空")
    private String detail;//描述
    @ApiModelProperty(value = "权限组菜单权限明细", required = true)
    private List<String> roles;
    @ApiModelProperty(value = "权限组接口权限明细", required = true)
    private List<String> interfaces;
    @ApiModelProperty(value = "是否启用")
    private boolean enable;
    @ApiModelProperty(value = "排序值，值越大越靠前")
    private int queue;
    @ApiModelProperty(value = "权限父级ID，顶级传0")
    private long parentId;
    @ApiModelProperty(value = "用户IDs")
    private List<Long> userIds;
}
